layout.tsx 897 B

1234567891011121314151617181920212223242526272829303132
  1. import Box from "@/components/Box";
  2. import HeaderBack from "@/components/HeaderBack";
  3. import { getTranslations } from "next-intl/server";
  4. import { ReactNode } from "react";
  5. export const generateMetadata = async () => {
  6. const t = await getTranslations("titles");
  7. return {
  8. title: t("cashback"),
  9. };
  10. };
  11. export default async function Layout({
  12. children,
  13. params: { locale },
  14. }: {
  15. children: ReactNode;
  16. params: { locale: string };
  17. cashbackInfo: ReactNode;
  18. // cashbackTable: ReactNode;
  19. }) {
  20. const t = await getTranslations("cashback");
  21. return (
  22. <>
  23. <HeaderBack showBack={true} title={t("cashbackTitle")} />
  24. <main className={"main-header bg-[#1f2225] text-[#000]"}>
  25. <Box>
  26. {/*{cashbackTable}*/}
  27. {children}
  28. </Box>
  29. </main>
  30. </>
  31. );
  32. }